package com.sctu.edu.tracks.adapter;

/**
 * Created by zhengsenwen on 2016/8/2.
 */
public class ViewPagerAdapter {

//    private List<View> viewList;
//    private Activity activity;
//    private List<HomeHeadBean.Data> list;
//
//    public ViewPagerAdapter(List<View> viewList,Activity activity,List<HomeHeadBean.Data> list) {
//        this.viewList = viewList;
//        this.activity = activity;
//        this.list = list;
//    }
//
//
//    @Override
//    public int getCount() {
//        if (viewList != null && viewList.size() > 0) {
//            return viewList.size();
//        } else {
//            return 0;
//        }
//    }
//
//    @Override
//    public boolean isViewFromObject(View view, Object o) {
//        return view == (View) o;
//    }
//
//    @Override
//    public void destroyItem(ViewGroup container, int position, Object object) {
//        container.removeView((View) object);
//        object = null;
//    }
//
//    @Override
//    public Object instantiateItem(ViewGroup container, final int position) {
//        viewList.get(position).setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                Bundle bundle = new Bundle();
//                bundle.putString("matchContent", list.get(position).getContent());
//                SharePreference.getInstance(activity).setCache(CacheConfig.CACHE_MATCH_ID,list.get(position).getId()+"");
//                JumpUtils.jumpActivity(activity, ActivityInformationActivity.class,bundle);
//            }
//        });
//        container.addView(viewList.get(position));
//        return viewList.get(position);
//    }
}
